import request from "@/utils/request";

export function list(queryParams){
  return request({
    url: "dv/machinery/list",
    method: "get",
    params: queryParams
  })
}

export function getWorkshop(){
  return request({
    url:  "dv/machinery/workshop",
    method: "get"
  })
}

export function insertMachinery(data){
  return request({
    url:"dv/machinery/insert",
    method:"post",
    data:data
  })
}

export function getMachineryTypeNameById(machineryId){
  return request({
    url:"dv/machinery/getMachineryTypeNameById",
    method:"get",
    params:{machineryId:machineryId}
  })
}

export function setMachinery(params){
  return request({
    url:"dv/machinery/change",
    method:"get",
    params: params
  })
}


export function deleteMachinery(params){
  return request({
    url:"dv/machinery/delete",
    method:"get",
    params: {
      machineryId: params
    }
  })

}
